﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using NUnit.Framework;
using SharePoint.Contrib.Extensions;

namespace NUnit.SharePointContrib
{
    [TestFixture]
    public class ObjectExtensionsTest
    {

        [SetUp]
        public void Init()
        {
        }


        [TearDown]
        public void Dispose()
        {
        }


        [Test]
        public void CanFindCustomAttributes()
        {
            MyCustomClass instance = new MyCustomClass();

            Assert.That(instance.Attributes<MyCustomAttribute>().Count(), Is.GreaterThanOrEqualTo(1));
        }
    }

    [MyCustom]
    public class MyCustomClass
    { 
    
    }

    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class MyCustomAttribute : Attribute
    { 
    
    }
}